package com.lpf.user.controller;

import com.lpf.user.service.UserDubboService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @DubboReference
    private UserDubboService userDubboService;

    @GetMapping("/user/{username}")
    public String getUserInfo(@PathVariable("username") String username) {
        return userDubboService.getUserInfo(username);
    }
}
